{% extends "user.html" %}
{% block content %}
    <div class="well">
	<h1>账户状态</h1>
	
	<!--<div class="row">
	    <div class="span5 offset1"> -->
		<table class="table table-bordered table-striped">
		    <tr>
			<td class="pagination-centered">帐号</td>
            <td>{{ User.Username }}</td>
		    </tr>
		    <tr>
			<td>套餐</td>
            <td>{{ User.Plan.Title }}</td>
		    </tr>
		    <tr>
			<td>余额</td>
            <td>{{ User.Credit }}元</td>
		    </tr>
		    <tr>
			<td>流量</td>
            <td>{{ User.Resource|filesizeformat }}/{{ User.Plan.Bandwidth|filesizeformat }}</td>
        </tr>
        <!--
		    <tr>
			<td>过期时间</td>
			<td>Feb 2, 2012</td>
        </tr>
        -->
		</table>
	    <!--</div>
	</div>-->
	
	<hr>
	<h2>使用记录</h2>
	
		<table class="table table-bordered table-striped table-condensed">
		    <thead>
			<tr>
			    <th>连接日期</th>
			    <th>持续时间</th>
			    <th>流量</th>
			    <th>客户端IP</th>
			    <th>连接方式</th>
			</tr>
		    </thead>
            <tbody>
                {% for record in Records %}
			<tr>
                <td>{{ record.ConnTime }}</td>
                <td>{{ record.Duration }}</td>
                <td>{{ record.Bandwidth|filesizeformat}}</td>
                <td>{{ record.IP       }}</td>
                <td>{{ record.Service  }}</td>
            </tr>
                {% endfor %}
		    </tbody>
		</table>
	    <a href="/user/log" class="btn btn-info">查看更多</a>
	
	<hr>
	<h2>更换套餐</h2>
	
	<hr>
	<h2>下载配置文件</h2>
	
    </div>
{% endblock %}
